
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module LogParser</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>LogParser</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/media/disk-1/data/zdstack/trunk/ZDStack/LogParser.py">/media/disk-1/data/zdstack/trunk/ZDStack/LogParser.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="LogParser.html#LogParser">LogParser</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="LogParser.html#ConnectionLogParser">ConnectionLogParser</a>
</font></dt><dt><font face="helvetica, arial"><a href="LogParser.html#GeneralLogParser">GeneralLogParser</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ConnectionLogParser">class <strong>ConnectionLogParser</strong></a>(<a href="LogParser.html#LogParser">LogParser</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ConnectionLogParser-__init__"><strong>__init__</strong></a>(self, log_type<font color="#909090">='server'</font>)</dt><dd><tt>Initializes&nbsp;a&nbsp;<a href="#ConnectionLogParser">ConnectionLogParser</a>.<br>
&nbsp;<br>
logtype:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;type&nbsp;of&nbsp;log&nbsp;to&nbsp;parse.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Valid&nbsp;options&nbsp;include&nbsp;'server'&nbsp;and&nbsp;'client'.</tt></dd></dl>

<dl><dt><a name="ConnectionLogParser-parse"><strong>parse</strong></a>(self, data)</dt><dd><tt>Parses&nbsp;data&nbsp;into&nbsp;LogEvents.<br>
&nbsp;<br>
data:&nbsp;a&nbsp;string&nbsp;of&nbsp;log&nbsp;data.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;2-Tuple&nbsp;(list&nbsp;of&nbsp;LogEvents,&nbsp;string&nbsp;of&nbsp;leftover&nbsp;data)</tt></dd></dl>

<hr>
Methods inherited from <a href="LogParser.html#LogParser">LogParser</a>:<br>
<dl><dt><a name="ConnectionLogParser-__call__"><strong>__call__</strong></a>(self, data)</dt></dl>

<dl><dt><a name="ConnectionLogParser-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<dl><dt><a name="ConnectionLogParser-__str__"><strong>__str__</strong></a>(self)</dt></dl>

<dl><dt><a name="ConnectionLogParser-split_data"><strong>split_data</strong></a>(self, data)</dt><dd><tt>Splits&nbsp;data&nbsp;into&nbsp;tokens&nbsp;that&nbsp;might&nbsp;be&nbsp;events.<br>
&nbsp;<br>
data:&nbsp;a&nbsp;string&nbsp;of&nbsp;log&nbsp;data.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;2-Tuple,&nbsp;(deque&nbsp;of&nbsp;split&nbsp;data,&nbsp;leftovers)</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="GeneralLogParser">class <strong>GeneralLogParser</strong></a>(<a href="LogParser.html#LogParser">LogParser</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="GeneralLogParser-__init__"><strong>__init__</strong></a>(self, log_type<font color="#909090">='server'</font>)</dt><dd><tt>Initializes&nbsp;a&nbsp;<a href="#GeneralLogParser">GeneralLogParser</a>.<br>
&nbsp;<br>
logtype:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;type&nbsp;of&nbsp;log&nbsp;to&nbsp;parse.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Valid&nbsp;options&nbsp;include&nbsp;'server'&nbsp;and&nbsp;'client'.</tt></dd></dl>

<dl><dt><a name="GeneralLogParser-parse"><strong>parse</strong></a>(self, data)</dt><dd><tt>Parses&nbsp;data&nbsp;into&nbsp;LogEvents.<br>
&nbsp;<br>
data:&nbsp;a&nbsp;string&nbsp;of&nbsp;log&nbsp;data.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;2-Tuple&nbsp;(list&nbsp;of&nbsp;LogEvents,&nbsp;string&nbsp;of&nbsp;leftover&nbsp;data)</tt></dd></dl>

<hr>
Methods inherited from <a href="LogParser.html#LogParser">LogParser</a>:<br>
<dl><dt><a name="GeneralLogParser-__call__"><strong>__call__</strong></a>(self, data)</dt></dl>

<dl><dt><a name="GeneralLogParser-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<dl><dt><a name="GeneralLogParser-__str__"><strong>__str__</strong></a>(self)</dt></dl>

<dl><dt><a name="GeneralLogParser-split_data"><strong>split_data</strong></a>(self, data)</dt><dd><tt>Splits&nbsp;data&nbsp;into&nbsp;tokens&nbsp;that&nbsp;might&nbsp;be&nbsp;events.<br>
&nbsp;<br>
data:&nbsp;a&nbsp;string&nbsp;of&nbsp;log&nbsp;data.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;2-Tuple,&nbsp;(deque&nbsp;of&nbsp;split&nbsp;data,&nbsp;leftovers)</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="LogParser">class <strong>LogParser</strong></a></font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="LogParser-__call__"><strong>__call__</strong></a>(self, data)</dt></dl>

<dl><dt><a name="LogParser-__init__"><strong>__init__</strong></a>(self, name, logtype<font color="#909090">='server'</font>)</dt><dd><tt>Initializes&nbsp;a&nbsp;<a href="#LogParser">LogParser</a>.<br>
&nbsp;<br>
name:&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;name&nbsp;of&nbsp;this&nbsp;<a href="#LogParser">LogParser</a>.<br>
logtype:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;type&nbsp;of&nbsp;log&nbsp;to&nbsp;parse.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Valid&nbsp;options&nbsp;include&nbsp;'server'&nbsp;and&nbsp;'client'.</tt></dd></dl>

<dl><dt><a name="LogParser-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<dl><dt><a name="LogParser-__str__"><strong>__str__</strong></a>(self)</dt></dl>

<dl><dt><a name="LogParser-parse"><strong>parse</strong></a>(self, data)</dt><dd><tt>Parses&nbsp;data&nbsp;into&nbsp;LogEvents.<br>
&nbsp;<br>
data:&nbsp;a&nbsp;string&nbsp;of&nbsp;log&nbsp;data.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;2-Tuple&nbsp;(list&nbsp;of&nbsp;LogEvents,&nbsp;string&nbsp;of&nbsp;leftover&nbsp;data)</tt></dd></dl>

<dl><dt><a name="LogParser-split_data"><strong>split_data</strong></a>(self, data)</dt><dd><tt>Splits&nbsp;data&nbsp;into&nbsp;tokens&nbsp;that&nbsp;might&nbsp;be&nbsp;events.<br>
&nbsp;<br>
data:&nbsp;a&nbsp;string&nbsp;of&nbsp;log&nbsp;data.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;2-Tuple,&nbsp;(deque&nbsp;of&nbsp;split&nbsp;data,&nbsp;leftovers)</tt></dd></dl>

</td></tr></table></td></tr></table>
</body></html>